<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: register.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."register.php";
include LOCALE.LOCALESET."user_fields.php";



$db = mysql_connect($GLOBALS['db_host'], $GLOBALS['db_user'], $GLOBALS['db_password']);
mysql_select_db($GLOBALS['db_name'], $db);   


$avloserid=$_GET['avloserid'];
$query=" SELECT * FROM avloser WHERE avloserid='$avloserid'";
$result=mysql_query($query);

$num=mysql_numrows($result);


opentable($locale['700']);
echo "<table border='0' cellpadding='5'>
<tr>
<td><b>Fornavn</b></td>
<td><b>Etternavn</b></td>
<td><b>Adresse</b></td>
<td><b>Postnr</b></td>
<td><b>Telefon</b></td>
<td><b>Mobil</b></td>
<td><b>Epost</b></td>
<td><b>Aktiv</b></td>
</tr>";


$i=0;
while ($i < $num) {
$avloserid=mysql_result($result,$i,"avloserid");
$fornavn=mysql_result($result,$i,"fornavn");
$etternavn=mysql_result($result,$i,"etternavn");
$adresse=mysql_result($result,$i,"adresse");
$postnr=mysql_result($result,$i,"postnr");
$telefon=mysql_result($result,$i,"telefon");
$mobil=mysql_result($result,$i,"mobil");
$epost=mysql_result($result,$i,"epost");
$aktiv=mysql_result($result,$i,"aktiv");






echo " 

<tr>
<td><a href='update_ny.php?avloserid=$avloserid'>$fornavn</a></td>
<td>$etternavn</td>
<td>$adresse</td>
<td>$postnr</td>
<td>$telefon</td>
<td>$mobil</td>
<td>$epost</td>
<td>$aktiv</td>
</tr>";


$i++;
}
echo " </table>";
echo "<form action='update_ny.php' method='post'>
<input type='Submit' value='Oppdater'>
</form>";

closetable();



require_once THEMES."templates/footer.php";


?>